In a traditional mobile network, a data communication path between terminals needs to pass through a core network entity serving gateway (SGW)/a packet data network gateway (PGW). Therefore, even when data is transferred between two terminals in close proximity, transmission still needs to go through a core network, resulting in a relatively great requirement for network transmission bandwidth and relatively low transmission efficiency.
To resolve the problem, a ProSe project is proposed. ProSe requires that terminals directly perform data exchange with each other, or that data exchange is performed only by using a base station but not by using a core network entity SGW/PGW. Therefore, communication efficiency between terminals in proximity can be improved.
To implement direct communication between terminals, two terminals need to perform mutual discovery. In some scenarios, mutual discovery between two terminals may be converted into mutual discovery between two application users, that is, if application users of a same application on two terminals implement mutual discovery, it may be considered that the two terminals have discovered each other. In the prior art, when two application users perform mutual discovery, the following problem exists:
In a process of mutual discovery between terminals, a second terminal has already stored a correspondence between an APP User ID of a first terminal and a corresponding code word of the APP User ID, and therefore, after obtaining, by means of monitoring, a code word, broadcast by the first terminal, of an application terminal identity (APP User ID) of the first terminal, the second terminal may directly discover the first terminal, but a network cannot learn an event that two application users have discovered each other, which is unfavorable to expense settlement of an operator and monitoring of a network event.